
const state = {
    app_name: "pwoerful-admin",
    isCollapse: false,
    menuWidth: 150
}

const mutations = {
   changeName (state, name){
    console.log(state)
     state.app_name = name
   },
    setIsCollapse(state, status){
       state.isCollapse = status
    },
    setMenuWidth(state, w){
        state.menuWidth = w
    },
}

const actions = {
  changeNameAct ({ state, commit }, name){
    console.log(state, commit)
    // state.app_name = name
    commit('changeName', name)
  },
}

const getters = {
    nameAdd(state){
        return state.app_name + '_darifo'
    },
    getCollapseStatus(state){
        return state.isCollapse
    },
    getMenuWidth(state){
        return state.menuWidth
    }
}

export default{
  namespaced: true,
  state,
  mutations,
  actions,
  getters
}